package com.ma.client;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Slf4j
@Component
public class ProductClientFallback implements ProductClient {

    @Override
    public List<Map<String, Object>> list() {
        log.info("fallback list");
        return List.of();
    }

    @Override
    public Map<String, Object> detail(Integer id) {
        log.info("fallback detail");
        return Map.of();
    }

    @Override
    public Map<String, String> getHeaders(Map<String, String> headers) {
        log.info("fallback getHeaders");
        return Map.of();
    }

    @Override
    public String hello() {
        return "hello fallback";
    }
}
